gdk/x11: Remove gdk_disable_multidevice()
authorCarlos Garnacho <carlosg@gnome.org>
Tue, 14 May 2019 22:02:48 +0000 (00:02 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Tue, 14 May 2019 23:05:20 +0000 (01:05 +0200)
Core events will be discontinued, so this call is meaningless now.

docs/reference/gdk/gdk4-sections.txt
gdk/x11/gdkdevicemanager-x11.c
gdk/x11/gdkx11devicemanager.h
gtk/gtktestutils.c

index 8eb27f7c89a71835eb9eb6c92aa44664cf3fb7d2..902b724ba3435e1ceff85144724f728e89594876 100644 (file)
@@ -823,7 +823,6 @@ gdk_x11_lookup_xdisplay
 gdk_x11_get_server_time
 gdk_x11_device_get_id
 gdk_x11_device_manager_lookup
-gdk_disable_multidevice
 gdk_x11_display_open
 gdk_x11_display_set_program_class
 gdk_x11_display_get_user_time
index 68cd0a06bfe884bc27fdd0611f794e5775bb41ea..7fec227aefdf5d9cc5ea668bc86ff2c6b8c65d18 100644 (file)
@@ -30,8 +30,6 @@
 #define VIRTUAL_CORE_POINTER_ID 2
 #define VIRTUAL_CORE_KEYBOARD_ID 3
 
-static gboolean _gdk_disable_multidevice = FALSE;
-
 GdkX11DeviceManagerCore *
 _gdk_x11_device_manager_new (GdkDisplay *display)
 {
@@ -50,8 +48,7 @@ _gdk_x11_device_manager_new (GdkDisplay *display)
           major = 2;
          minor = 3;
 
-          if (!_gdk_disable_multidevice &&
-              XIQueryVersion (xdisplay, &major, &minor) != BadRequest)
+          if (XIQueryVersion (xdisplay, &major, &minor) != BadRequest)
             {
               GdkX11DeviceManagerXI2 *device_manager_xi2;
 
@@ -118,12 +115,6 @@ gdk_x11_device_manager_lookup (GdkX11DeviceManagerCore *device_manager,
  *
  * Returns the device ID as seen by XInput2.
  *
- * > If gdk_disable_multidevice() has been called, this function
- * > will respectively return 2/3 for the core pointer and keyboard,
- * > (matching the IDs for the Virtual Core Pointer and Keyboard in
- * > XInput 2), but calling this function on any slave devices (i.e.
- * > those managed via XInput 1.x), will return 0.
- *
  * Returns: the XInput2 device ID.
  **/
 gint
@@ -145,21 +136,3 @@ gdk_x11_device_get_id (GdkDevice *device)
 
   return device_id;
 }
-
-/**
- * gdk_disable_multidevice:
- *
- * Disables multidevice support in GDKs X11 backend. This call must happen prior
- * to gdk_display_open(), gtk_init() or gtk_init_check() in order to
- * take effect.
- *
- * Most common GTK+ applications won’t ever need to call this. Only
- * applications that do mixed GDK/Xlib calls could want to disable
- * multidevice support if such Xlib code deals with input devices in
- * any way and doesn’t observe the presence of XInput 2.
- */
-void
-gdk_disable_multidevice (void)
-{
-  _gdk_disable_multidevice = TRUE;
-}
index 51833a954abb13c39f20d4553dbb9e88c387dcef..b0cd50b423398654b3dae137f384d3d04e53104c 100644 (file)
@@ -33,9 +33,6 @@ G_BEGIN_DECLS
 GDK_AVAILABLE_IN_ALL
 GdkDevice * gdk_x11_device_manager_lookup (GdkX11DeviceManagerCore *device_manager,
                                            gint                     device_id);
-GDK_AVAILABLE_IN_ALL
-void         gdk_disable_multidevice (void);
-
 
 G_END_DECLS
 
index 75d62dc72d74bfb0f8a29435ff0b7dec944698af..34c802bcedc70f83198093509d25e901c6860d11 100644 (file)
@@ -79,15 +79,6 @@ gtk_test_init (int    *argcp,
   gtk_disable_setlocale();
   setlocale (LC_ALL, "en_US.UTF-8");
 
-  /* XSendEvent() doesn't work yet on XI2 events.
-   * So at the moment gdk_test_simulate_* can only
-   * send events that GTK+ understands if XI2 is
-   * disabled, bummer.
-   */
-#ifdef GDK_WINDOWING_X11
-  gdk_disable_multidevice ();
-#endif
-
   gtk_init ();
 }